1 How to build aMule with Visual Studio
\r
2 See also http://www.amule.org/wiki/index.php/HowTo_compile_with_Visual_Studio
\r
4 This solution for Microsoft's Visual Studio 2008 has been configured to be as easy as possible to set up.
\r
6 However, given the size of the aMule project and the libraries it uses, along with limitations in the way Visual Studio works,
\r
7 a couple of items must be setup separately. Additionally, some source code files might need patching due to incompatibilities
\r
8 with some generated files.
\r
10 The solution expects to find the following items:
\r
12 * wxWidgets ( http://www.wxwidgets.org ) at a specific location: ..\..\wxWidgets\ from the solution directory.
\r
13 * crypto++ ( http://www.cryptopp.com/ ) at a specific location: ..\..\cryptopp\ from the solution directory.
\r
16 This means you must create a folder where you will compile aMule, and it must have this structure:
\r
18 - <Root folder> - Your main folder. You can name it whatever you want.
\r
20 | - wxWidgets ( wxWidgets sources, no intermediate subfolder )
\r
22 | - wxWidgets29 ( wxWidgets 2.9 sources, only required if you want to build against unstable wx 2.9 )
\r
24 | - cryptopp ( Crypto++ sources, no intermediate subfolder )
\r
26 | - <amule-sources> ( aMule sources, no intermediate subfolder, can have any name )
\r
29 I hope this is simple enough to get you started.
\r
31 If wxWidgets fails to compile, please read http://wiki.wxwidgets.org/Microsoft_Visual_CPP_Guide
\r
33 There is sometimes a problem with the cryptopp project in the release and debug build, if some projects fail to link
\r
34 and give you a warning about redefined symbols, go to the properties on the cryptopp project, configuration "release" and change
\r
35 the "Configuration Properties"->"C/C++"->"Code generation"->"Runtime library" to "Multithreaded DLL (/MD)"
\r
36 in the release build or "Multithreaded Debug DLL (/MDd)" for the debug build.
\r
38 There are four solutions:
\r
40 which includes aMule, aMule tools and aMule's internal libs
\r
41 2) aMule-MSVCE-ExtLibs.sln
\r
42 includes only wxWidgets and Crypto++ and builds a single library libext.lib from them. You must first build this solution before building aMule-MSVCE.sln
\r
43 3) aMule-MSVCE-ExtLibs29.sln
\r
44 same but using wxWidgets 2.9
\r
46 includes everything and is organized in folders. It only works with the commercial edition of MSVC and is outdated now.
\r
48 The Debug/Release configs build against wxWidgets 2.8 (stable), Debug29/Release29 configs build against wxWidgets 2.9 (unstable)
\r
50 To build aMule with GeoIP see libs\libGeoIP\readme.txt .
\r
51 Without it you get an error building libGeoIP when you build the full solution.
\r
52 Just ignore it or unload the libGeoIP project.
\r
55 If aMule fails to compile, here are some guidelines/patches to the most common problems:
\r
57 [*] If Scanner.cpp fails to compile, apply this change around line 1545:
\r
59 - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
\r
60 + b->yy_is_interactive = 0;
\r
64 [*] The file muuli_wdr.cpp can also fail if it hasn't been patched for MSVC in the current code. The most common problem comes
\r
65 from this kind of lines:
\r
67 _("For a film you can say its length, its story, language ...\n"
\r
68 "and if it's a fake, you can tell that to other users of aMule."),
\r
70 Notice the opening and closing parentheses are on a different line, and the quotes opened again. While this is ok for gcc, Visual
\r
71 Studio won't allow it. Change this lines to be a single-line quoted text. In the above example, the result will be:
\r
73 _("For a film you can say its length, its story, language ...\nand if it's a fake, you can tell that to other users of aMule."),
\r
75 And that should be it. Feel free to ask in the aMule forum at forum.amule.org, "Compilation problems" section if you have further
\r